package main

func isBalanced(num string) bool {
	sum1 := 0
	sum2 := 0
	for i, c := range num {
		if i%2 == 0 {
			sum1 += int(c - '0')
		} else {
			sum2 += int(c - '0')
		}
	}
	return sum1 == sum2
}
